home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)ts.d64
/
sprite manip.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
100 lines
82 PRINT"[147]"
83 REM**********************************
84 REM(#)_MEANS BIT VALUE OF PARTICULAR
85 REM SPRITE(S) *
95 REM***********************************
96 REM SPRITE VALUE POKED (BIT VALUE)
97 REM ----- -----------
98 REM 0 1
99 REM 1 2 * * * * * * * *
100 REM 2 4 *NOTE: TO USE
105 REM 3 8 *MORE THAN ONE
210 REM 4 16 *SPRITE-ADD
211 REM 5 32 *POKE VALUES:
212 REM 6 64 *E.G.ADD 16+64=
213 REM 7 128*80 & POKE 80
214 REM *TO USE SPRITES
215 REM * 4 & 6 *
216 REM*********************************
217 V=53248:REM _ START OF VIC CHIP *
218 REM*********************************
219 PRINTTAB(10)"[144] [146]"
220 PRINTTAB(10)" [146]"
221 REM ^ BACKGROUND PRINTED *
222 REM*********************************
224 POKE53276,28:
225 REM ^ SET MULTICOLOUR MODE(#) *
229 REM*********************************
230 POKE53281,1:POKE53280,2:
231 REM ^ SET SCREEN & BORDER COLOURS*
232 REM*********************************
240 POKE53285,6:POKE53286,7:
241 REM ^ SET TWO COLOURS "IN" SPRITE *
242 REM*********************************
250 POKE53287+2,3:
251 REM ^ SET COLOUR "OF" SPRITE (2) *
252 REM*********************************
255 REM ^ COLOUR VALUES 0 TO15 FOR EACH
256 REM ^ OF THE 'COLOUR' POKES ABOVE *
257 REM*********************************
260 POKE53271,4:POKE53277,12
262 REM ^ EXAND IN Y:EXPAND IN X
263 REM ^ POKE'0'FOR NORMAL SIZE
264 REM ^ USE (#) FOR PARTICULAR
266 REM ^ SPRITE(S) *
268 REM*********************************
270 POKE53275,16:REM_BACKGROUND PRIORITY
300 REM*********************************
320 POKEV+21,28:REM_ENABLE SPRITE(S) (#)
328 REM*********************************
330 POKE2042,13:POKE2043,13:POKE2044,13:
331 REM ^ SPRITE(S) DATA STORED IN
332 REM ^ 13TH BLOCK. ONE BLOCK=64.
334 REM ^ THUS STARTING AT 13*64=832.
335 REM ^ SEE LINE 140.
336 REM ^ NOTE:
338 REM ^ POKE 2040+SPRITE NO.,BLOCK
339 REM*********************************
340 FORN=0TO53:READQ:POKE832+N,Q:NEXT
342 REM ^'0'TO'53' IS NUMBER OF DATA
343 REM ^ ENTERIES.-I.E.THERE IS 54
344 REM ^ ENTERIES. EACH DATA ENTERY
345 REM ^ IS POKED INTO A LOCATION
346 REM ^ STARTING AT 832 (PART OF
347 REM ^ CASSETTE BUFFER) *
348 REM*********************************
350 FORX=1TO255
360 POKEV+4,X:REM_UPDATES#2,XCOORDINATE
362 POKEV+6,X:REM_UPDATES#3,XCOORDINATE
364 POKEV+8,X:REM_UPDATES#4,XCOORDINATE
365 REM*********************************
370 POKEV+5,X:REM_UPDATES#2,YCOORDINATE
372 POKEV+7,255-X:REM_UPDATES#3,YCOORD.
374 POKEV+9,100:REM_UPDATES#4,Y COORD. *
375 REM********************************
380 NEXTX
395 REM********************************
400 POKE53264,16:REM_ENABLE LAST 64
402 REM POSITIONS ON HORIZONTAL
404 REM FOR SPRITE #4
406 REM********************************
410 FORI=0TO63:REM_MOVE LAST 64 POSIT.
420 POKEV+8,I:REM_UPDATE #4 X COORDS
440 NEXTI
442 REM********************************
445 POKE53264,0:REM_TURN OFF REGISTER
447 REM TO MOVE LAST 64
449 REM POSITIONS
450 GOTO350
452 REM********************************
5000 DATA 85, 170, 170, 85, 170, 170, 85, 170, 170
5010 DATA 170, 175, 250, 170, 175, 250, 170, 175, 250
5020 DATA 170, 175, 250, 170, 170, 170, 168, 2, 170
5030 DATA 168, 0, 170, 168, 0, 170, 168, 0, 42
5040 DATA 170, 170, 170, 170, 170, 170, 170, 170, 170
5050 DATA 170, 170, 170, 170, 170, 170, 170, 170, 170
5990 REM********************************
6000 REM ^ DATA TAKEN FROM SPRITE
6005 REM ^ EDITOR. *
6010 REM********************************